<include file="Public:header"/>
<style>
    .weui_media_info_meta{font-size:13px;color:#CECECE;}
    a:-webkit-any-link {color: #353535;}
</style>
<div class="weui_panel weui_panel_access">
    <div class="weui_panel_hd"></div>
    <div class="weui_panel_bd" id="lister">

         <volist name="re" id="vo">

        <div class="weui_media_box weui_media_text">
            <a href="{:U('Index/logDetail?cid='.$vo[cid])}">
                <h4 class="weui_media_title">{$vo.title}</h4>
                <p class="weui_media_desc">{$vo.content}</p>
                <ul class="weui_media_info">
                    <li class="weui_media_info_meta">{$vo.sr_time|date='Y-m-d H:i:s',###}</li>
                </ul>
            </a>
        </div>

        </volist>

    </div>
    <a onclick="getMore()" class="weui_panel_ft">查看更多</a>
</div>
<include file="Public:footer"/>
<script>
    var page=0;
    var text = "";
    function getLocalTime(nS) {
        return new Date(parseInt(nS) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ");
    }
    function getMore(){
        page=eval(page+5)

        $.post("{:U('Index/dataMore')}",{page:page},function(re){
              if(re.state=='success'){
                  var info=re.info;
                  var url="{:U('Index/logDetail')}";
                  $.each(info,function(k,v){

                      text += '<div class="weui_media_box weui_media_text">';
                      text += ' <a href="'+url+'?cid='+ v.cid+'">';
                      text += '   <h4 class="weui_media_title">'+ v.title+'</h4>';
                      text += '<p class="weui_media_desc">'+ v.content+'</p>';
                      text += '<ul class="weui_media_info">';
                      text += '   <li class="weui_media_info_meta">'+getLocalTime(v.sr_time)+'</li>';
                      text += ' </ul>';
                      text += '   </a>';
                      text += '  </div>';
                  })

                  $("#lister").append(text);

              }else if(re.state=='error'){
//                  alert('无更多数据');
              }
        })
    }
</script>

